package com.boarsoft.rpc.filter;

import java.lang.reflect.Method;

public class ReflectUtil {
	/**
	 * 返回方法签名
	 * 
	 * @return
	 */
	public static String getMethodSign(Method method) {
		StringBuilder sb = new StringBuilder();
		sb.append(method.getName()).append("(");
		Class<?>[] pca = method.getParameterTypes();
		if (pca.length > 0) {
			for (Class<?> c : pca) {
				sb.append(c.getName()).append(",");
			}
			sb.setLength(sb.length() - 1);
		}
		sb.append(")");
		return sb.toString();
	}
}
